/** @jsxImportSource @emotion/react */
import * as React from "react";
import {
  CCell, Cell, Table, TableBody, TableRow
} from "customize-easy-ui-component";
import {DirectLink} from "../../../routing/Link";
import Img_Seal from "../../../images/seal.png";

export const 编制审核Utili= ({theme, orc, rep,bcap,pcap} :{theme: any, orc:any, rep:any,bcap?:string,pcap?:string}
) => {
  return <>
    <Table fixed={ ["4.6%","50%","4.2%","11.5%","%"] }  css={ {borderCollapse: 'collapse' } } tight miniw={800}>
      <TableBody>
        <DirectLink  href={`/report/${rep?.modeltype}/ver/${rep?.modelversion}/${rep?.id}/Conclusion`}>
          <TableRow>
            <CCell>{bcap ?? '编制'}</CCell>
            <CCell>{orc.检验人IDs}</CCell>
            <CCell>日期</CCell>
            <CCell>{orc.检验日期 || '／'}</CCell>
            <CCell rowSpan={3}>
              <div css={{
                height:'7rem',
                '::before': {
                  filter: 'opacity(30%)',
                  width: '100%',
                  height: '100%',
                  backgroundImage: `url(${Img_Seal})`,
                  content: '" "',
                  position: 'absolute',
                  top: 0,
                  left: 0,
                  backgroundRepeat: 'no-repeat',
                  backgroundPosition: 'center',
                }
              }}>
                <Table  fixed={ ["40%","%"]  }
                        css={ {borderCollapse: 'collapse',height:'fill-available'} } tight miniw={800}>
                  <TableBody>
                    <TableRow>
                      <CCell css={{border:'none'}}>机构核准证号：</CCell>
                      <CCell css={{border:'none'}}>{rep?.isp?.ispu?.agency?.apno}</CCell>
                    </TableRow>
                    <TableRow>
                      <CCell css={{border:'none'}} colSpan={2}>（检验机构公章或者检验专用章）</CCell>
                    </TableRow>
                    <TableRow>
                      <CCell css={{border:'none'}}>日期：</CCell>
                      <Cell css={{border:'none'}}>2024/03/04</Cell>
                    </TableRow>
                  </TableBody>
                </Table>
              </div>
            </CCell>
          </TableRow>
        </DirectLink>
        <TableRow>
          <CCell>审核</CCell>
          <CCell></CCell>
          <CCell>日期</CCell>
          <CCell></CCell>
        </TableRow>
        <TableRow >
          <CCell>{pcap ?? '审批'}</CCell>
          <CCell></CCell>
          <CCell>日期</CCell>
          <CCell></CCell>
        </TableRow>
      </TableBody>
    </Table>
    </>;
};
